package com.mtf.controller;

import com.mtf.util.RedisGenerateIDUtils;
import lombok.extern.slf4j.Slf4j;
import org.luaj.vm2.ast.Str;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import redis.clients.jedis.Jedis;

/**
 * @Author matengfei
 * @Date 2024/7/5 18:26
 * @PackageName:com.mtf.controller
 * @ClassName: MyController
 * @Description: 测试Controller
 * @Version 1.0
 */
@RequestMapping("/test")
@RestController
@Slf4j
public class MyController {

    @GetMapping("/lua")
    public String testReadLuaFile(){
        RedisGenerateIDUtils idUtils = new RedisGenerateIDUtils();
        idUtils.getIncrByLuaFile(new Jedis(),"order",60*1000L);
        return "读取成功！";
    }
}
